import logging
def getLogger():
    my_logger=logging.getLogger('ncp')
    my_logger.setLevel('DEBUG')
    formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s")
    ch=logging.StreamHandler()
    ch.setLevel('DEBUG')
    ch.setFormatter(formatter)
    my_logger.addHandler(ch)
    fh=logging.FileHandler('ncp.log',encoding='utf-8')
    fh.setLevel('DEBUG')
    fh.setFormatter(formatter)
    my_logger.addHandler(fh)
    return my_logger